﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Gaur;

namespace GaurConsoleTest
{
    class State: IState
    {
        public string name;

        #region IState Members

        public IState Clone()
        {
            State clone = new State();
            clone.name = this.name;
            return clone;
        }

        #endregion
    }

    class Program
    {
        static void Main(string[] args)
        {
            //Regex a = new Regex("a");
            //Regex b = new Regex("b");
            //Regex c = new Regex("c");
            //Regex bc = new Alt();
            //bc.Add(new Regex("b"));
            //bc.Add(new Regex("c"));

            //Regex res = ~c + ~(~a | b) + c;

            //Console.WriteLine(res.ToString());

            //Fa dfa = new Fa();
            //dfa.AddTrans(1, 'a', 2);
            //dfa.AddTrans(1, 'b', 3);

            State state = new State();
            state.name = "xxx";
            Fa dfa = new Fa();

            int s1 = dfa.NewState(state);
            int s2 = dfa.NewState(state);
            int s3 = dfa.NewState(state);
            dfa.AddTrans(s1, 'a', s2);
            dfa.AddTrans(s2, 'v', s3);

            dfa.AcceptStates.Add(s2);

            Set<int> liveStates = dfa.GetLiveStates();
            dfa.RemoveDeadStates();

            //State cl = state.Clone() as State;
            //Gaur.Fa clone = dfa2.Clone();

        }
    }
}
